﻿<Window x:Class="Quizzer.Views.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
       
        xmlns:local="clr-namespace:Quizzer.ViewModel"
        xmlns:helpers="clr-namespace:Quizzer.Helpers"
        xmlns:views="clr-namespace:Quizzer.Views"
        
        mc:Ignorable="d" 
        Title="Quizzer" 
        SizeToContent="WidthAndHeight" 
        ResizeMode="NoResize" 
        WindowStartupLocation="CenterScreen"
        MouseLeftButtonDown="Window_MouseLeftButtonDown_1"
        WindowStyle="None"
        BorderThickness="1"
        DataContext="{Binding Main, Source={StaticResource Locator}}" MinHeight="480" MinWidth="640">
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <Grid Grid.Row="0" Margin="10,10,10,0" VerticalAlignment="Top">
            <Button Command="{Binding Back}" Content="Back" 
                    HorizontalAlignment="Left"
                    Background="White"
                    BorderThickness="0" 
                    IsTabStop="False"
                    Visibility="{Binding IsBackVisible}"/>
            <Button Command="{Binding CloseApplication}" Content="Close" 
                    HorizontalAlignment="Right"
                    Background="White"
                    BorderThickness="0" IsTabStop="False"/>
        </Grid>
        
        <ContentControl Content="{Binding CurrentViewModel}" 
                        Margin="10,10,10,10" 
                        Grid.Row="1" 
                        IsTabStop="False"/>
    </Grid>
</Window>
